#include <iostream>
#include "Test.h"
#include "../Quotient.h"

class QuotientTest : public TestSuite::Test
{
	public:
		QuotientTest()
		{}
		virtual ~QuotientTest() {}

		void run (void)
		{
			test_( Quotient(41,97) == Quotient(41,97) );
			test_( Quotient(41,97) == Quotient(82,194) );
			test_( Quotient(41,97) != Quotient(42,97) );
			test_( Quotient(41,97) == Quotient(23,97) + Quotient(18,97) );
			test_( Quotient(41,97) == Quotient(33,291) + Quotient(60,194) );
			test_( Quotient(41,97) == (Quotient(33,291) += Quotient(60,194)) );
			test_( Quotient(18,97) == Quotient(41,97) - Quotient(23,97) );
			test_( Quotient(60,194) == Quotient(41,97) - Quotient(33,291) );
			test_( Quotient(60,194) == (Quotient(41,97) -= Quotient(33,291)) );
			test_( Quotient(6,4) == Quotient(2,4) + 1 );
			test_( Quotient(6,4) == (Quotient(2,4) += 1) );
			test_( Quotient(-2,4) == Quotient(2,4) - 1 );
			test_( Quotient(-2,4) == (Quotient(2,4) -= 1) );
			test_( Quotient(6,4) == Quotient(2,4) * 3 );
			test_( Quotient(6,4) == (Quotient(2,4) *= 3) );
			test_( Quotient(1,6) == Quotient(2,4) / 3 );
			test_( Quotient(1,6) == (Quotient(2,4) /= 3) );
			test_( Quotient(3,8) == Quotient(2,4) * Quotient(3,4) );
			test_( Quotient(3,8) == (Quotient(2,4) *= Quotient(3,4)) );
			test_( Quotient(2,4) == Quotient(3,8) / Quotient(3,4) );
			test_( Quotient(2,4) == (Quotient(3,8) /= Quotient(3,4)) );
			test_( Quotient(2,4) == Quotient(0.5) );
			test_( Quotient(5,9) == Quotient(0.5555555555) );
			Quotient mine(0.5555555555);
			std::cout << mine.Numerator() << "/" << mine.Denominator() << std::endl;
		}
	protected:
	private:
		QuotientTest(const QuotientTest&);
		QuotientTest& operator=(const QuotientTest&);
};
